package io.renren.modules.user.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;

import io.renren.modules.statistis.statistisEntity;
import io.renren.modules.user.entity.TPeopleDictionaryEntity;
import io.renren.modules.user.entity.TPeopleEntity;
import io.renren.modules.user.entity.TPeopleFireDetachmentEntity;
import io.renren.modules.user.entity.vo.PeopleCountVo;
import io.renren.modules.user.entity.vo.PeopleHistoryVo;
import io.renren.modules.user.entity.vo.PeopleVo;
import io.renren.modules.user.entity.vo.PeopleZZVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 人员
 * 
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2019-08-02 10:30:00
 */
@Mapper
public interface TPeopleDao extends BaseMapper<TPeopleEntity> {

    /*
     *人员分布图(消防员)
     */
    List<PeopleVo> findPeopleList(@Param("parentId") String parentId,@Param("squadron") String squadron);

    /*
     *人员分布图(专职消防员)
     */
    List<PeopleZZVo> findPeopleZZList(@Param("parentId")String parentId,@Param("squadron") String squadron);
    /*
     *人员分布图(消防员)
     */
    List<PeopleVo> findPeopleClassesList(@Param("deptId")Integer deptId);

    /*
     *人员分布图(专职消防员)
     */
    List<PeopleZZVo> findPeopleClassesZZList(@Param("deptId")Integer deptId);

    /*
    * 人员信息查询
    * */
    List<TPeopleEntity> queryPageList(Map<String,Object> map);
	/*
	*历史人员
	* */
    List<PeopleHistoryVo> peopleHistory(@Param("peopleType") Integer peopleType,@Param("deptId") String deptId,@Param("year") String year,@Param("squadron") String squadron);
    /*
     * 人员信息查询导出用
     * */
    List<TPeopleEntity> queryPageList2();
    /*
    * 个人信息查询
    * */
    List<TPeopleEntity> queryPageList1(Integer id);

    /*
     *历史人员
     * */
    List<PeopleHistoryVo> peopleHistoryDept(@Param("peopleType") Integer peopleType,@Param("deptId") String deptId,@Param("year") String year,@Param("zdeptId") String zdeptId);
    /*
    * 历史人组
    * */
    List<PeopleHistoryVo> peopleHistoryClasses(@Param("peopleType") Integer peopleType,@Param("deptId") String deptId,@Param("year") String year);



    //人员统计
    /*
    * 消防员统计
    * */
    List<TPeopleEntity> peopleCount();
    /*
    * 根据支队统计人数
    * */
    List<TPeopleFireDetachmentEntity> peopleDeptCount();
    /*
    *  衔级统计分析
    * */
    List<TPeopleDictionaryEntity> peopelTitleCount();
    /*
    * 合同期限分布图
    * */
    List<PeopleZZVo> peopleContractCount();
    /*
    * 自主分析
    * */
    List<TPeopleEntity> findPeopleSexList(String deptId);


    /*
    * 人员
    * */
    PeopleCountVo peopledeptCount(@Param("deptId")String deptId);

    /*
     * 人员
     * */
    PeopleCountVo peopledeptCount1(@Param("deptId")String deptId);
    /*
     * 人员
     * */
    PeopleCountVo peopledeptCount2(@Param("deptId")String deptId,@Param("classes")String classes);

    /*
    * 中对统计信息
    * */
    List<PeopleVo> peopleListInfo(@Param("deptId") String deptId,@Param("zdeptId") String zdeptId);

    /*
    * 中队专职消防员
    * */
    List<PeopleZZVo> findPeopleZList(@Param("parentId") String parentId,@Param("zdeptId")String zdeptId);



    /*
    * 消防总队
    * */
    PeopleVo findAllDept();

    /*
    * 专职总队
    * */
    PeopleZZVo findALLZZDept(statistisEntity peopleVo);

    /*
    * 历史总队
    * */
    PeopleHistoryVo peopleAllHistory(statistisEntity peopleVo);


    /**
     * 总队数据
     */
    List<PeopleVo> totalCount(statistisEntity peopleVo);

    TPeopleEntity getPeopleInfoByIdCard(@Param("idcard")String idcard);



}
